package ascloud.biz.ctrl;

import javax.annotation.Resource;

import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import ascloud.biz.domain.Filbert;
import ascloud.biz.util.JpDateUtil;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
public class HelloController {

	@Resource
	private DiscoveryClient discoveryClient;

	@GetMapping("/hello")
	public String hello() {
		log.info(">>>>>>>HelloController.hello<<<<<<<");
		return "Hello core! @" + JpDateUtil.getJpDate();
	}

	@GetMapping("/filbert")
	public Filbert filbert() {
		log.info(">>>>>>>HelloController.filbert<<<<<<<");
		Filbert filbert = new Filbert();
		filbert.setId(System.currentTimeMillis());
		filbert.setName("filbert name");
		return filbert;
	}

}
